<?php

function fnInsertMsg($NoHp, $Msg, $Sender) {
    $results = mysql_query("INSERT INTO outbox (DestinationNumber, TextDecoded, CreatorID) 
                            VALUES ('$NoHp', '$Msg', '$Sender') ");
    return $results;
}

function fnMyOutbox($NoHp, $Msg, $Sender) {
    $results = mysql_query("INSERT INTO mst_sms_outbox (tgl_kirim, no_tujuan, isi_pesan, pengirim) 
                            VALUES (now(), '$NoHp', '$Msg', '$Sender') ");
    return $results;
}

function fnGetId($NoHp, $Msg, $Sender) {
    $results = mysql_query("SELECT id FROM mst_sms_outbox  
                            WHERE no_tujuan = '$NoHp'
                            AND isi_pesan = '$Msg'
                            AND pengirim = '$Sender'");
    return $results;
}

function fnChangeStsKirim($IdOutBox) {
    $results = mysql_query("UPDATE mst_sms_outbox set sts_kirim = 1 
                            WHERE id = ".$IdOutBox);
    return $results;
}

?>
